

<template>
  <div class="reportBtns">
    <div class="btnBox">
      <div
        v-for="item in getReportPickInfo"
        :key="item.terminalId"
        class="BtnItem"
        @click="handlePickType(item)"
      >
        {{ item.title }}
      </div>
    </div>
  </div>
</template>

<script>
import { buildParentApi } from "@/utils/designer/util";
export default {
  name: "reportKeyboard2-module",
  props: {
    //prop传入的表单JSON配置
    parentApi: {
      type: Object,
      default: () => buildParentApi(),
    },
    devType: {
      type: Boolean,
      default: false,
    },
  },
  computed: {
    //  取号机业务类型列表
    getReportPickInfo() {
      let devType = this.devType;
      let reportPickInfo = this.$store.getters["getReportPickInfo"];
      let reportPickShowInfo;
      if (devType) {
        reportPickShowInfo = reportPickInfo["apiData"];
      } else {
        reportPickShowInfo = reportPickInfo["mockData"];
      }
      return reportPickShowInfo;
    },
  },
  methods: {
    handlePickType(row) {
      // 调用父组件的函数--回传数据
      //this.$emit('goToInit', row);
      this.parentApi.executeParentMethod("goToInit", row);
      this.$emit("jumpIndex", 0);
    },
  },
};
</script>
<style scoped>
.reportBtns{
    height: 100%;
    overflow: scroll;
}
.btnBox {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.BtnItem {
  border-radius: 40px;
  width: 50%;
  padding: 40px 40px;
  text-align: center;
  background: #0059b3;
  color: white;
  margin-top: 40px;
}
</style>
